package com.hytc.mymall.watcher;

import android.text.Editable;
import android.text.TextWatcher;

import com.hytc.mymall.utils.BaseTools;
/**
 * Created by Administrator on 2016/12/1.
 */

public class RealNameWatcher implements TextWatcher
{
    public void afterTextChanged(final Editable editable) {
        final String string = editable.toString();
        if (!BaseTools.isRealName(string) && string.length() >= 1) {
            editable.delete(-1 + string.length(), string.length());
        }
    }

    public void beforeTextChanged(final CharSequence charSequence, final int n, final int n2, final int n3) {
    }

    public void onTextChanged(final CharSequence charSequence, final int n, final int n2, final int n3) {
        System.out.println(String.valueOf(charSequence.toString()) + "---" + n + "--" + n2 + "--" + n3);
    }
}

